home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 22
/
Aminet 22 (1997)(GTI - Schatztruhe)[!][Dec 1997].iso
/
Aminet
/
util
/
conv
/
CPC.lha
/
CPC.dopus
< prev
next >
Wrap
Text File
|
1997-09-29
|
3KB
|
125 lines
/* $VER: CPC.dopus 1.32 (20.8.97) © Ljubomir Jankovic
CPC.dopus v1.32 by Ljubomir Jankovic <lurch@afrodita.rcub.bg.ac.yu>
Convert your files fast B).
Instalation:
For use from Opus configure a button or menu item like this:
AREXX <path_to_the_script>CPC.dopus [<from_cp> <to_cp>]
^^^^^---(set the cyclebutton to AREXX)
Explanation of the arguments:
<from_cp> - codepage to convert FROM
(one of: YUSCII, AMIGA, CP852, ISO8859-2, CP1250)
without brackets
<to_cp> - codepage to convert TO
(one of: YUSCII, AMIGA, CP852, ISO8859-2, CP1250, ASCII)
without brackets
Note: Default <from_cp> and <to_cp> are CP852 and AMIGA, respectively.
If you don't supply valid arguments for <from_cp> and/or
<to_cp>, CPC's GUI will appear.
Requirements:
- CPC
- RexxReqTools.library v37+
- RexxSupport.library v34+
- RexxTricks.library v38+
Usage:
Just select a file, then run the script. If everything went allright
the file will be converted, otherwise you'll be presented with a
requester with a description what went wrong. It's that simple!
History:
- v1.0: initial release
- v1.1: fixed few bugs, deleted few unnecessary lines
- v1.2: now a Opus ARexx script! No need for {o} in calling line
because it gets the file you selected in Opus window
- v1.21: few minor adjustments
- v1.3: now requires RexxTricks.library
- v1.31: fixed a problem with paths that have space in name
(e.g. "Ram Disk:")
- v1.32: changed a bit handling of paths with spaces
Thanks to:
- Andrija Antonijevic <TheAntony@bigfoot.com>
for writing great CPC (Code Page Converter) & for BETA testing.
(Zdravo Andrija!)
*/
if ~show('L','rexxreqtools.library') then
if ~addlib('rexxreqtools.library',0,-30,0) then exit(10)
if ~show('L','rexxsupport.library') then
if ~addlib('rexxsupport.library',0,-30,0) then exit(10)
if ~show('L','rexxtricks.library') then
if ~addlib('rexxtricks.library',0,-30,0) then exit(10)
OPTIONS RESULTS
CPCpath="C:CPC"
/* ^--- Change this to fit your system */
ver="1.32";title="CPC.dopus v"ver;pos="rt_reqpos=reqpos_centerwin"
button="Shit!";onlyone="Select only ONE file!";yes="Yup!"
PARSE ARG from to portname
upper from; upper to
if portname~=='' then
address value portname
else
portname=address()
parse var portname '.' port /* port number */
if exists('T:Error.log') then delete('T:Error.log')
BUSY ON
STATUS 3
win=RESULT
STATUS 7 win
entries=RESULT
if entries>1 then call JustOne
STATUS 13 win
dir=RESULT
GETNEXTSELECTED win
filename=RESULT
SELECTFILE filename 0 SHOW
DISPLAYDIR win
path='"'dir||filename'"'
ADDRESS COMMAND CPCpath path path" FROM "from" TO "to" OVERWRITE >T:Error.log"
if rc~=0 & exists('T:Error.log') then call Crap
delete('T:Error.log')
RESCAN win
BUSY OFF
exit
JustOne: call rtezrequest(onlyone,yes,title,pos)
RESCAN win
BUSY OFF
exit
Crap: call readfile('T:Error.log',error)
line=error.0
rerror=error.line
call rtezrequest(rerror,button,title,pos)
delete('T:Error.log')
RESCAN win
BUSY OFF
exit